﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace v1_SweetGeeks.Model
{
    public class Customer
    {
        public int id;
        public string name;
        public List<Task> tasks;

        public Customer(int id, string name)
        {
            tasks = new List<Task>();
            this.id = id;
            this.name = name;
        }

        public void AddTask(Task task)
        {
            bool exsist = false;
            foreach(Task t in tasks)
            {
                if(t.id == task.id)
                {
                    exsist = true;
                }
            }

            if(!exsist)
            {
                tasks.Add(new Task(task));
            }
        }
    }
}
